import request from '@/utils/request'
import qs from "qs";

export function receiveCoupon(couponId) {
  return request({
    url: `/api/coupon/reception/receiveCoupon/${couponId}`,
    method: 'post'
  })
}

export function getReceiveCoupon() {
  return request({
    url: '/api/coupon/reception/getReceiveCoupon',
    method: 'get'
  })
}

export function getCouponByMemberId(query) {
  return request({
    url: '/api/coupon/reception/getCouponByMemberId',
    method: 'get',
    params: {token: query}
  })
}

export function getCouponByCanUse() {
  return request({
    url: `/api/coupon/reception/getCouponByCanUse`,
    method: 'get'
  })
}

export function getCouponByAlreadyUse() {
  return request({
    url: `/api/coupon/reception/getCouponByAlreadyUse`,
    method: 'get'
  })
}

export function getCouponByOutTime() {
  return request({
    url: `/api/coupon/reception/getCouponByOutTime`,
    method: 'get'
  })
}
